<?php
require_once('config.php');
try {
	$userid = 2;
    $dbh = new PDO('mysql:host=localhost;dbname=simpleauth', DB_USER, DB_PASSWORD,array(PDO::ATTR_PERSISTENT > true));
    $stmt = $dbh->prepare('SELECT * from user where user.userid = ?') ;
	$stmt->bindParam(1, $userid , PDO::PARAM_STR);
	$stmt->execute();
	//$rows = $stmt->fetchAll();
	
	foreach($stmt->fetchAll() as $row) {
        print_r($row);
    }
    $dbh = null;
} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
}


?>